<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "api" middleware group. Make something great!
|
*/

//Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
//    return $request->user();
//});

Route::prefix('')->group(function () {
    Route::any('/test', 'App\Http\Controllers\TestController@test');
    Route::post('/testLogin', 'App\Http\Controllers\AuthController@testLogin');
    Route::post('/refresh', 'App\Http\Controllers\AuthController@refresh');

    Route::middleware(['auth:api'])->group(function () {
        Route::get('/me', 'App\Http\Controllers\AuthController@me');

    });
});
